<template>
	<div class="ks_body ks_body_red">
		<div class="banner">
			<image :src="dateInfo.banner" mode="widthFix"></image>
		</div>
		
		<div class="optionItems">
			<div class="item" @click="changePath(item.path)" v-for="(item,index) in dateInfo.list">
				<image :src="item.img" mode="widthFix"></image>
			</div>
		</div>
		
		<div class="bottom">
			<image :src="dateInfo.intro" mode="widthFix"></image>
		</div>
		
	
	</div>
</template>

<script>
	import { mapActions } from 'vuex';
	const db = wx.cloud.database()
export default {
	name: 'headcomd',
	data() {
		return {
			openid: "",
			banner: "https://www.baixuemianshi.com/zhuanti/images/banner_ks.jpg?" + new Date(),
			dateInfo:""
		};
	},
	
	onLoad(options) {
		
	},
	onShareAppMessage(options) {},
	onShareTimeline(res) {},
	computed: {
		userphone() {
			return this.$store.getters.userphone ? this.$store.getters.userphone : '';
		},
	},
	mounted() {
		let that = this
		
	},
	
	created() {
		let that = this
		that.getBms()
	},
	methods: {
		...mapActions(['LogSetPhone']),
		changePath(p){
			uni.navigateTo({
				url: p
			})
		},
		getBms() {
			let that = this
			uni.request({
				url: 'https://www.baixuemianshi.com/zhuanti/kesu/js/index.js',
				method: 'get',
				dataType: 'text',
				data: {
					sstimes: new Date()
				},
				success: function(res) {
					var resjson = JSON.parse(res.data);
					that.dateInfo = resjson
				}
			});
		},
	},
	components: {}
};
</script>

<style>
@import url("./index.css");

</style>

